
@extends('layouts.master')

@section('title')
    文章列表——钢链网管理后台
@stop
@section('app_css')
    <link rel="stylesheet" href="/resource/css/bootstrap.min.css">
    <link rel="stylesheet" href="/resource/css/font-awesome.min.css">
    <link rel="stylesheet" href="/resource/css/animate.min.css">

    <link rel="stylesheet" href="/resource/css/custom.css">
    <link rel="stylesheet" href="/resource/css/green.css">
    <link rel="stylesheet" href="/resource/css/fileinput.min.css">
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
@stop
@section('app_js')
    <script src="/resource/js/jquery.min.js"></script>
    <script src="/resource/js/bootstrap.min.js"></script>
    <script src="/resource/js/custom.js"></script>

    <!-- icheck -->
    <script src="/resource/js/icheck.min.js"></script>
    <!-- Datatables -->
    <script src="/resource/js/jquery.dataTables.js"></script>
    <script src="/resource/js/J_main.js"></script>
    <!-- 添加图片 -->
    <script src="/resource/js/fileinput.min.js"></script>
    <script src="/resource/js/fileinput_locale_zh.js"></script>
    <script>
        $(document).delegate('.btn-success','click',function(){
            var examine = $("[name='inlineRadioOptions']:checked").val();
            var purchase_id = $('#purchase_id').val();
            var title = $('#title').val();
            var spec = $('#spec').val();
            var num = $('#num').val();
            var unit = $('#unit').val();
            var price = $('#price').val();
            var place = $('#place').val();
            var contacts = $('#contacts').val();
            var tell = $('#tell').val();
            var company = $('#company').val();
            $.ajax({
                url : '/admin/purchase_resource_examine',
                type : "POST",
                data : {examine:examine,purchase_id:purchase_id,title:title,spec:spec,num:num,unit:unit,price:price,place:place,contacts:contacts,tell:tell,company:company},
                dataType : "json",
                cache:"false",
                timeout:30000,
                success : function(json) {
                    if(json.code == 1){
                        console.log(json.code);
                    }else{
                        console.log(json.code);
                    }
                }
            });
            location.href="/admin/purchase_resource";
        });

    </script>
@stop
@section('content')
<body class="nav-md">

<div class="container body">


    <div class="main_container">



        @include('common.admin_menu')




        <!-- top navigation -->
        @include('common.admin_nav')
        <!-- /top navigation -->


        <!-- page content -->
        <div class="right_col" role="main">

            <div class="">

                <div class="row cont">

                    <div class="col-md-6 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>发布采购单管理 <small>发布采购单审核</small></h2>
                                <div class="clearfix"></div>
                            </div>

                            <div class="x_content">
                                <br />


                                    <div class="form-group">
                                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="first-name">商品标题
                                        </label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="title" value="{{$info->title}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-2 col-sm-2 col-xs-12" for="last-name">规格
                                        </label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="spec" value="{{$info->spec}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">数量</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="num" value="{{$info->num}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">单位</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="unit" value="{{$info->unit}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">价格</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="price" value="{{$info->price}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">交货地</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="place" value="{{$info->place}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">联系人</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="contacts" value="{{$info->contacts}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">电话</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="tell" value="{{$info->tell}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">公司</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <input class="form-control col-md-7 col-xs-12" id="company" value="{{$info->company}}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="middle-name" class="control-label col-md-2 col-sm-2 col-xs-12">状态</label>
                                        <div class="col-md-10 col-sm-10 col-xs-12">
                                            <label class="radio-inline">
                                                <input type="radio" name="inlineRadioOptions" value="0" @if($info->state == 0) checked @endif> 审核中
                                            </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="inlineRadioOptions" value="2" @if($info->state == 2) checked @endif> 审核失败
                                            </label>
                                            <label class="radio-inline">
                                                <input type="radio" name="inlineRadioOptions" value="1" @if($info->state == 1) checked @endif> 审核通过
                                            </label>
                                        </div>
                                    </div>
                                    <div class="ln_solid"></div>
                                    <div class="form-group">
                                        <div class="col-md-10 col-sm-10 col-xs-12 col-md-offset-3">
                                            <input type="hidden" id="purchase_id" value="{{$info->purchase_id}}">
                                            <button type="submit" class="btn btn-primary">取消</button>
                                            <button type="submit" class="btn btn-success">提交</button>
                                        </div>
                                    </div>


                            </div>
                        </div>
                    </div>

                    <br />
                    <br />
                    <br />

                </div>
            </div>

            <!-- footer content -->

            <footer>
                <div class="">
                    <p class="pull-right">Copyright 2016 ganglianw.com All rights reserved. |
                        <span class="lead"> <i class="fa fa-logo-footer"></i> 钢链网后台管理系统</span>
                    </p>
                </div>
                <div class="clearfix"></div>
            </footer>
            <!-- /footer content -->
        </div>
        <!-- /page content -->

    </div>
</div>

<div id="custom_notifications" class="custom-notifications dsp_none">
    <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
    </ul>
    <div class="clearfix"></div>
    <div id="notif-group" class="tabbed_notifications"></div>
</div>


</body>
@stop
